import request from '@/utils/request';

let mouldName = 'nodes';
export default {

  getPage(params) {
    return request({
      url: `/${mouldName}/page`,
      method: 'get',
      params
    });
  },
  makeSnapShot() {
    return request({
      url: `/${mouldName}/makeSnapShot`,
      method: 'get'
    });
  },
  getServicePage(params) {
    return request({
      url: `/${mouldName}/servicePage`,
      method: 'get',
      params
    });
  },
  nodeAble(nodeId) {
    return request({
      url: `/${mouldName}/nodeable`,
      method: 'get',
      params: {
        nodeId
      }
    });
  },
  nodeDisable(nodeId) {
    return request({
      url: `/${mouldName}/nodedisable`,
      method: 'get',
      params: {
        nodeId
      }
    });
  },
  getNodeStatusData(params) {
    return request({
      url: `/${mouldName}/nodestatusData`,
      method: 'get',
      params
    });
  },
  getStaticsData(params) {
    return request({
      url: `/${mouldName}/staticsdata`,
      method: 'get',
      params
    });
  },
  getLastTimePage(params) {
    return request({
      url: '/nodesLasttime/page',
      method: 'get',
      params
    });
  },
  getNodesOperatorInfoPage(params) {
    return request({
      url: '/nodesOperatorInfo/page',
      method: 'get',
      params
    });
  }
};

